package com.aixin.csopuser.repository;

import com.aixin.csopuser.domain.PolicyDomain;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;
import java.util.Optional;

public interface PolicyRepository extends JpaRepository<PolicyDomain,Long> {
//    @Query(value = "SELECT * FROM policy where customerID=:customerID order by insEffeData desc",nativeQuery = true)
//    List<PolicyDomain> getPolicy(@Param("customerID") String customerID);

    List<PolicyDomain> findAllByCustomerID(String customerID);

    List<PolicyDomain> findByPolicyNumber(String policyNumber);
}
